<?php defined('InShopNC') or exit('Access Invalid!');?>

<div id="member_center_box" class="ncm-index-container">
</div>

<div class="outline" style="margin-top: 20px;">
<link rel="stylesheet" type="text/css" href="<?php echo SHOP_TEMPLATES_URL;?>/css/layout-records.css"/>
<link rel="stylesheet" type="text/css" href="<?php echo SHOP_TEMPLATES_URL;?>/css/layout-invitation.css"/>
<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/js/ZeroClipboard.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo SHOP_RESOURCE_SITE_URL;?>/css/Comm.css"/>

<div class="R-content">
	<div class="member-t"><h2>邀请好友</h2></div>

	<div id="divInvited" class="success-invitation gray02"  >
		<p>复制链接邀请好友拿纪念银币！ <a target="_blank" href="<?php echo SHOP_SITE_URL?>index.php?act=member&op=sns" class="blue">详情&gt;&gt;</a></p>
		<span><b></b><input id="txtInfo"  style="width:500px;height:20px; " disabled="disabled" value="注册就送优惠券啦，快去看看吧！ <?php echo BASE_SITE_URL?>/mobile/index.php?act=register&ref=<?php echo $output['home_member_info']['member_name'];?>" onpaste="return false" type="text"></span>
		<div class="d_clip_copy"></div>
		<div id="d_clip_container" style="position:relative;">
			<div id="d_clip_button" class="bluebut" style="text-align:center;margin-top:24px"  >复制</div>
		</div>
	</div>

	<div id="divInviteInfo" class="get-tips gray01" style="">成功邀请 <span class="orange"><?php echo (int)$output['invite_count'];?></span> 位会员注册，已有 <span class="orange"><?php echo (int)$output['deposit_count'];?></span> 位会员参与 <font style="color:red">0</font> 元抢购活动</div>
	<div id="divList" class="list-tab SuccessCon"><ul class="listTitle"><li>ID</li><li class="w200">用户会员</li><li class="w100">姓名</li><li class="w100">手机号</li><li class="w200">时间</li></ul>
		<?php
		if(!empty($output['invite_list'])) {
			foreach ($output['invite_list'] as $invite) {
				?>
				<ul>
					<li><?php echo $invite['invite_id'];?></li>
					<li class="w200"><?php echo $invite['user_id'];?></li>
					<li class="w100"><?php echo $invite['user_name'];?></li>
					<li class="w100"><?php echo $invite['invite_mobile'];?></li>
					<li class="w200"><?php echo date('Y.m.d H:i:s',$invite['invite_time']);?></li>

				</ul>
			<?php }
		}else{
		?>
		<div class="tips-con"><i></i>您还未有邀请谁哦</div></div>
	<?php }?>

</div>
	<div id="divPageNav" class="pagination" ><?php echo $output['show_page'];?></div>
	<div class="get-tips gray01">门票发放记录 </div>
	<div class="list-tab SuccessCon"><ul class="listTitle"><li class="w300">发放产品</li><li class="w300">发放时间</li></ul></div>

</div>

<style type="text/css">
	#d_clip_container,.my_clip_button,.d_clip_copy{margin:0;width:65px; height:22px;   text-align:center;}
	#d_clip_container{top:-45px;left:508px;}
	#fe_text{resize:none;margin-bottom:10px;}
	.my_clip_button {position:absolute; border:1px solid #999; background-color:#1ba3fa; cursor:default; font-size:9pt; }
	.my_clip_button.hover { background-color:#1ba3fa; }
	.my_clip_button.active { background-color:#1ba3fa; }
	.d_clip_copy{ font-size:14px;color:#000;}

</style>

<style>
	.goods_show li{
		color:#7D7D7D;
		float:left;
		width:194px;
	}
	.goods_show li a{
		color:#22AAFF;
		border-bottom:1px solid #22AAFF;
	}
</style>
<script>
	var clip = null;
	function copy(id){ return document.getElementById(id); }
	function initx(){
		clip = new ZeroClipboard.Client();
		clip.setHandCursor(true);
		ZeroClipboard.setMoviePath("<?php echo RESOURCE_SITE_URL;?>/js/ZeroClipboard.swf");
		clip.addEventListener('mouseOver',function (client){
			clip.setText(copy('txtInfo').value );
		});
		clip.addEventListener('complete',function(client,text){
			alert("邀请复制成功");
		});
		clip.glue('d_clip_button','d_clip_container');
	}
	$(function(){
		initx();
	})

</script>
</div>


<script type="text/javascript">
$(function(){
	var INFO_TYPE = [ 'member_info','order_info','goods_info','sns_info'];
	function _ajax_load(type) {
		$.ajax({
			   url: 'index.php?act=member&op=ajax_load_'+type,
			   success: function(html){
				   INFO_TYPE.shift();
				   if (INFO_TYPE[0]) {
					   _ajax_load(INFO_TYPE[0]);
				   }
				   $('#member_center_box').append(html);
			   }
		});
	}
	_ajax_load(INFO_TYPE[0])
});
</script>